Repository navigation
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
8a413fd to
e87cbb1
Compare
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Fixes #50393
Type of change
What does this PR do?
Every
@wordin a comment was read as a workspace path, so a comment likeor should I use @here?attached a file calledhereand showed "File not found".Comment mentions now count as files only when they look like paths: they start with
~or contain/,\,.or#. This is the rule proposed in the issue. Mentions picked from autocomplete in the prompt are separate file parts and are not affected.Tradeoff: a root-level file with no dot or slash, such as
MakefileorLICENSE, no longer attaches from a comment. This includes picking it from the comment editor's @-autocomplete, which inserts the bare name (@Makefile). Typing@./Makefilestill attaches it. If you would rather keep the picker working for these files, it could insert@./<name>for them. I am happy to add that here or in a follow-up.This follows the approach in #50526, which was auto-closed for template compliance rather than reviewed.
How did you verify your code works?
Rebased onto current
v2and re-ran everything:@here,@channeland@everyonenext to a real@src/shared.tsmention. It fails without the change and passes with it.bun test --conditions=solid --preload ./happydom.ts src/composer/inpackages/app: 76 pass.bun run test:unitinpackages/app: 731 pass, 0 fail.bun run checkfrom the repository root passes.Screenshots / recordings
Not a visual change.
Checklist